<form class="ui form" (ngSubmit)="create()">
    <div class="fields">
        <div class="four wide field">
            <label>{{'parameter_name' | translate}}</label>
            <input type="text" name="name" [(ngModel)]="newParameter.name">
        </div>
        <div class="two wide field">
            <label>{{'parameter_type' | translate}}</label>
            <sm-select class="fluid search" name="type" [options]="{'fullTextSearch': true}" [(model)]="newParameter.type">
                <option *ngFor="let type of parameterTypes" value="{{type}}">{{type}}</option>
            </sm-select>
        </div>
        <div class="four wide field">
            <label>{{'parameter_value' | translate}}</label>
            <app-parameter-value [project]="project" [suggest]="suggest" [type]="newParameter.type" [(value)]="newParameter.value" [editList]="true" [keys]="keys"></app-parameter-value>
        </div>
        <div class="four wide field">
            <label>{{'parameter_description' | translate}}</label>
            <textarea [(ngModel)]="newParameter.description" name="description" rows="{{ _sharedService.getTextAreaheight(newParameter.description)}}"></textarea>
        </div>
        <div class="two wide field" *ngIf="!project">
            <label>{{'parameter_advanced' | translate}}</label>
            <div class="ui checkbox">
                <input type="checkbox" name="advanced" [(ngModel)]="newParameter.advanced">
                <label></label>
            </div>
        </div>
        <div class="two wide center field">
            <button class="ui blue button" [disabled]="!newParameter.name"><i class="plus icon"></i>{{ 'btn_add' | translate}}</button>
        </div>
    </div>
</form>
